<?php /* Smarty version 2.6.26, created on 2014-02-20 13:49:56
         compiled from default/public/cart.html */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="view/default/style/basic.css" />
<link type="text/css" rel="stylesheet" href="view/default/style/cart.css" />
<script type="text/javascript" src="view/default/js/ajax.js"></script>
<script type="text/javascript" src="view/default/js/cart.js"></script>
<title>在线商城会员中心</title>
</head>
<body>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "default/public/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div id="sait">
    当前位置：<a href="./">首页</a> &gt; 购物车
</div>
<table id="cart" cellspacing="1">
    <tr><th>编号</th><th>名称</th><th>属性</th><th class="th">售价</th><th>数量</th><th class="th">小计</th><th class="th">操作</th></tr>
    <?php $this->assign('num', 0); ?>
    <?php $_from = $this->_tpl_vars['myCart']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
    <input type="hidden" name="id" value=<?php echo $this->_tpl_vars['value']['id']; ?>
 />
    <tr><td><?php echo $this->_tpl_vars['value']['sn']; ?>
</td><td><?php echo $this->_tpl_vars['value']['name']; ?>
</td><td>
        <?php $_from = $this->_tpl_vars['value']['attr']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
?>
            <?php echo $this->_tpl_vars['k']; ?>
:
            <?php $_from = $this->_tpl_vars['v']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k2'] => $this->_tpl_vars['v2']):
?>
            <?php echo $this->_tpl_vars['v2']; ?>
;
            <?php endforeach; endif; unset($_from); ?> 
        <?php endforeach; endif; unset($_from); ?>
    </td>
    <td class="price"><?php echo $this->_tpl_vars['value']['price_sale']; ?>
元</td><td><input type="text" title="<?php echo $this->_tpl_vars['num']++; ?>
" name="num" class="small" value="<?php echo $this->_tpl_vars['value']['num']; ?>
" onkeyup="changeNum(this,<?php echo $this->_tpl_vars['value']['id']; ?>
,<?php echo $this->_tpl_vars['value']['price_sale']; ?>
)"/> <span class="warning" style="color:red;display:none;">库存不足!</span></td><td style="color:red;" class="sprice" ><?php echo $this->_tpl_vars['value']['total_small']; ?>
元</td><td><a href="?a=cart&m=delPro&id=<?php echo $this->_tpl_vars['value']['id']; ?>
">删除</a></td></tr>
    <?php endforeach; endif; unset($_from); ?>
</table>
<p>合计:<strong class="price" id="total"><?php echo $this->_tpl_vars['total']; ?>
</strong>元 <a href="<?php echo $_COOKIE['prev']; ?>
">继续购物</a> | <a href="?a=cart&m=clearCar">清空购物车</a></p>
<input type="hidden" id="t_cart" value="<?php echo $_COOKIE['cart']; ?>
" />
<p class="flow"><a href="?a=cart&m=flow" id="flow" onclick="return checkCartIsNull();"><img src="view/default/images/checkout.gif" /></a></p>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'default/public/footer.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</body>
</html>